package com.example.demo.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class WebController {
	
	@RequestMapping("/login")
    public String index(){
        return "index";
//        ModelAndView modelAndView = new ModelAndView("/index"); //设置对应JSP的模板文件
//        modelAndView.addObject("hi", "Hello,Cat"); //设置${hi}标签的值为Hello,Cat
//        return modelAndView;
    }
	
	@RequestMapping("/test")
	public String test(){
//		return "redirect:/WEB-INF/test.jsp";
		return "test";
//        ModelAndView modelAndView = new ModelAndView("/index"); //设置对应JSP的模板文件
//        modelAndView.addObject("hi", "Hello,Cat"); //设置${hi}标签的值为Hello,Cat
//        return modelAndView;
	}

}